import { createSession } from "../db/chat";

export default defineEventHandler(async event => {
    // auth payload
    const { _id } = event.context.auth;

    // create session
    const session = await createSession(_id);

    // return template
    return { code: 0, data: { session_id: session._id, template: '' }, msg: '' };
});